﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AssemblyExplorer
{
    public partial class MethodsDisplay : Form
    {
        string[] Info;
        string[] begin = {""};
        public string ClassName { get; set; }

        public MethodsDisplay(string[] info)
        {
            
            Info = info;
            InitializeComponent();
            this.methodsRtfBox.SelectionAlignment = HorizontalAlignment.Center;
            //Build More Strings
            //this.methodsRtfBox.Lines += begin;
            this.methodsRtfBox.Lines = info;
        }

        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Get the contents of the rtf control, offer to save it
            saveRtfOutput.Filter = "RTF Documents (*.rtf)|*.rtf";
            saveRtfOutput.Title = "Save Class Methods.";
            saveRtfOutput.FileName = ClassName;
            saveRtfOutput.ShowDialog();
            try
            {
                this.methodsRtfBox.SaveFile(this.saveRtfOutput.FileName);
            }
            catch { }

        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
            this.Dispose();
        }

        private void MethodsDisplay_Load(object sender, EventArgs e)
        {

        }

        private void saveRtfOutput_FileOk(object sender, CancelEventArgs e)
        {
        }
    }
}
